/PROG  PNS0011
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "V214-2900/3000";
PROG_SIZE	= 3340;
CREATE		= DATE 22-11-30  TIME 10:00:50;
MODIFIED	= DATE 25-02-26  TIME 05:36:40;
FILE_NAME	= PNS0010;
VERSION		= 0;
LINE_COUNT	= 118;
MEMORY_SIZE	= 3804;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0077 ;
   7:  !  PART:6373101-3201  ;
   8:  !HL_1122************************* ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.2    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  R[5:SPEED]=10    ;
  24:  OVERRIDE=R[5:SPEED] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P1 PICK ENTRY OK]=ON AND DI[3:FROM RL1 CLEAR]=ON AND DI[8:P1 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  R[5:SPEED]=100    ;
  53:  OVERRIDE=R[5:SPEED] ;
  54:J P[3:PICK APPROACH] 100% CNT50 ACC100    ;
  55:   ;
  56:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  57:  CALL CHK_PICK    ;
  58:  PAYLOAD[2] ;
  59:  MONITOR Z_CHECH ;
  60:J P[5:PICK DEPART] 100% CNT40 ACC100 TA R[20]sec,DO[5:TO RL1 DROP START]=PULSE,1.0sec    ;
  61:  DO[8:P1 PARTS OUT]=PULSE,0.5sec ;
  62:  LBL[27] ;
  63:  CALL CHECKPICK    ;
  64:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  65:   ;
  66:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  67:   ;
  68:  LBL[30:GOTO DROP POUNCE] ;
  69:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  70:   ;
  71:  TIMER[3]=STOP ;
  72:  LBL[40:AT DROP POUNCE] ;
  73:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  74:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P2 DROP ENTRY]=ON,JMP LBL[50] ;
  75:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  76:  JMP LBL[40] ;
  77:   ;
  78:  LBL[50:MOVE DROP SNEAK] ;
  79:  TIMER[3]=START ;
  80:  OVERRIDE=R[5:SPEED] ;
  81:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  82:  LBL[51:DROP OR C-P-S] ;
  83:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  84:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  85:  JMP LBL[51] ;
  86:  JMP LBL[50] ;
  87:   ;
  88:  LBL[60:MOVE CLS-PRS-ACC] ;
  89:J P[1:MIDDLE] 50% CNT100 ACC150    ;
  90:  PAUSE ;
  91:  JMP LBL[30] ;
  92:   ;
  93:  LBL[80:DROP ENABLED] ;
  94:  TIMER[3]=START ;
  95:  !PROCEED TO DROP ;
  96:  OVERRIDE=R[5:SPEED] ;
  97:J P[10:DROP APPROACH] 100% CNT20 ACC100    ;
  98:   ;
  99:  MONITOR END Z_CHECH ;
 100:J P[11:DROP] 100% CNT5 ACC100 TB R[19]sec,CALL PARTDROP    ;
 101:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 102:  PAYLOAD[3] ;
 103:  CALL CHK_DROP    ;
 104:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 105:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 106:  //DO[7:PRESS STAMPING START]=PULSE,1.0sec ;
 107:  !GOTO PICK POUNCE ;
 108:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 109:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 110:  JMP LBL[10] ;
 111:   ;
 112:  LBL[90:END OF CYCLE] ;
 113:  TIMER[1]=STOP ;
 114:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 115:J P[1:MIDDLE] 50% CNT100 ACC150    ;
 116:  MOVE TO HOME    ;
 117:   ;
 118:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1986.203  mm,	Y =    -8.098  mm,	Z = -1015.211  mm,
	W =  -179.183 deg,	P =     1.681 deg,	R =  -179.587 deg,
	E1=   104.349 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.359  mm,	Y =  1576.000  mm,	Z =  -912.206  mm,
	W =   179.321 deg,	P =     1.370 deg,	R =   150.805 deg,
	E1=   134.033 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2615.648  mm,	Y =  3208.181  mm,	Z =  -934.080  mm,
	W =   179.171 deg,	P =     -.747 deg,	R =    90.335 deg,
	E1=   195.885 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2615.649  mm,	Y =  3208.181  mm,	Z = -1031.521  mm,
	W =   179.171 deg,	P =     -.747 deg,	R =    90.335 deg,
	E1=   195.885 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2615.648  mm,	Y =  3208.180  mm,	Z =  -903.360  mm,
	W =   179.171 deg,	P =     -.747 deg,	R =    90.335 deg,
	E1=   195.885 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2156.936  mm,	Y =  1701.303  mm,	Z =  -880.000  mm,
	W =   178.999 deg,	P =      .916 deg,	R =   141.270 deg,
	E1=   143.604 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2081.831  mm,	Y = -1240.871  mm,	Z =  -910.187  mm,
	W =  -178.136 deg,	P =      .752 deg,	R =  -152.190 deg,
	E1=   105.677 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2208.516  mm,	Y = -1894.404  mm,	Z =  -911.404  mm,
	W =  -178.189 deg,	P =      .052 deg,	R =  -136.661 deg,
	E1=    82.972 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2664.805  mm,	Y = -3323.968  mm,	Z =  -946.361  mm,
	W =  -179.287 deg,	P =    -1.003 deg,	R =   -89.222 deg,
	E1=    14.687 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2664.803  mm,	Y = -3323.969  mm,	Z = -1137.400  mm,
	W =  -179.287 deg,	P =    -1.003 deg,	R =   -89.222 deg,
	E1=    14.687 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2664.805  mm,	Y = -3323.967  mm,	Z = -1040.201  mm,
	W =  -179.287 deg,	P =    -1.003 deg,	R =   -89.222 deg,
	E1=    14.687 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2215.425  mm,	Y = -1446.040  mm,	Z = -1010.706  mm,
	W =  -178.739 deg,	P =      .563 deg,	R =  -145.226 deg,
	E1=    70.104 deg
};
/END
